using System;
using System.Runtime.Serialization;
using Common;
using Common.Enum;

namespace SExperiment.ExperimentResult
{
	[Serializable]
	public class ADWellResult : WellResult
	{
		[NonSerialized]
		private Curve _Curve = new Curve();

		[NonSerialized]
		private Curve _PolarCurve = new Curve();

		[NonSerialized]
		private double _Angle;

		[NonSerialized]
		private double _QualityFactor;

		private EADGenoType _TypeNo;

		private string _TypeName;

		public Curve Curve
		{
			get
			{
				return _Curve;
			}
			set
			{
				if (_Curve != value)
				{
					_Curve = value;
					OnPropertyChanged("Curve");
				}
			}
		}

		public Curve PolarCurve
		{
			get
			{
				return _PolarCurve;
			}
			set
			{
				if (_PolarCurve != value)
				{
					_PolarCurve = value;
					OnPropertyChanged("PolarCurve");
				}
			}
		}

		public double Angle
		{
			get
			{
				return _Angle;
			}
			set
			{
				if (_Angle != value)
				{
					_Angle = value;
					OnPropertyChanged("Angle");
				}
			}
		}

		public double QualityFactor
		{
			get
			{
				return _QualityFactor;
			}
			set
			{
				if (_QualityFactor != value)
				{
					_QualityFactor = value;
					OnPropertyChanged("QualityFactor");
				}
			}
		}

		public EADGenoType TypeNo
		{
			get
			{
				return _TypeNo;
			}
			set
			{
				if (_TypeNo != value)
				{
					_TypeNo = value;
					OnPropertyChanged("TypeNo");
				}
			}
		}

		public string TypeName
		{
			get
			{
				return _TypeName;
			}
			set
			{
				if (!(_TypeName == value))
				{
					_TypeName = value;
					OnPropertyChanged("TypeName");
				}
			}
		}

		[OnDeserialized]
		private void OnDeserialized(StreamingContext context)
		{
			if (_Curve == null)
			{
				_Curve = new Curve();
			}
		}
	}
}
